#include <iostream>
#include <deque>
#include <queue>
#include <string>

using namespace std;

int add_n(int n)
{
	 int i = 100;
	i += n;
	return i;
}

int gcd(int x, int y);

struct Info{
	std::string name;
	float score;
	
	bool operator < (const Info &a) const{
		return a.score < score;
	}
};

int main(){

	std::priority_queue<Info> pq;
	Info inf;
	Info &info = inf;
	info.name = "Jack";
	info.score = 68.5;
	pq.push(info);

	info.name = "Bomi";
	info.score = 18.5;
	pq.push(info);

	info.name = "Peti";
	info.score = 90;
	pq.push(info);

	while(!pq.empty()){
		std::cout << pq.top().name << ": " << pq.top().score << std::endl;
		pq.pop();
	}


	int x = 0, y = 0;
	while(std::cin>>x>>y)
		std::cout << gcd(x, y) << std::endl;

	int a = 1;
	a = add_n(3);
	a = add_n(3);

	int *pi = new int( 10 );
	int *pia = new int[ 10 ];
	while ( *pi < 10 ) {
		pia[ *pi ] = *pi;
		*pi = *pi + 1;
	}
	delete pi;
	delete [] pia;


	std::deque<int> ideque;
	ideque.push_back(1);
	ideque.push_back(2);
	ideque.push_back(3);

	ideque.push_front(10);
	ideque.push_front(20);

	ideque.insert(ideque.begin() + 1, 100);
	ideque.insert(ideque.begin() + 3, 200);

	std::deque<int>::iterator it = ideque.begin();
	while(it != ideque.end()){
		std::cout << *it++ << std::endl;
	}

	std::deque<int>::reverse_iterator re_it = ideque.rbegin();
	while(re_it != ideque.rend()){
		std::cout << *re_it++ << std::endl;
	}

	return 0;
}

int gcd(int x, int y){
	if(y == 0)
		return x;
	gcd(y, x%y);
}